<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改巡检记录，巡检人员上传现场数据')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-record-edit" th:object="${sysRecord}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="plantId" th:field="*{plantId}" type="hidden">
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">设备编号：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <input name="plantId" th:field="*{plantId}" class="form-control" type="text" required>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label is-required">用户编号：</label>-->
<!--                <div class="col-sm-4">-->
<!--                    <input name="userId" th:field="*{userId}" class="form-control" type="text">-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">温度：</label>
                <div class="col-sm-4 is-required">
                    <input style="width: 20%;display: inline-block" name="temperature" th:field="*{temperature}" class="form-control" type="text">
                    <span>℃</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">压力：</label>
                <div class="col-sm-4">
                    <input style="width: 20%;display: inline-block" name="pressure" th:field="*{pressure}" class="form-control" type="text">
                    <span>kpa</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">设备状态：</label>
                <div class="col-sm-4">
                    <div class="radio-box" th:each="dict : ${@dict.getType('sys_plant_status')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
<!--            <div class="form-group">    -->
<!--                <label class="col-sm-3 control-label">记录时间：</label>-->
<!--                <div class="col-sm-8">-->
<!--                    <div class="input-group date">-->
<!--                        <input name="recordTime" th:value="${#dates.format(sysRecord.recordTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">-->
<!--                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/record";
        $("#form-record-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-record-edit').serialize());
            }
        }

        $("input[name='recordTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>